// ActionScript file
package com.app.model{
 	import com.adobe.cairngorm.model.IModelLocator;

 	[Bindable]
	public class ModelLocator implements IModelLocator
	{
		private static var modelLocator : ModelLocator;
		
		public static function getInstance() : ModelLocator 
		{
			if ( modelLocator == null )
				 modelLocator = new ModelLocator();
				
			return modelLocator;
	   }
	   
	   	public function ModelLocator() 
	   	{
	   		if ( modelLocator != null )
					throw new Error( "Only one ModelLocator instance should be instantiated" );	
	   	}
		
		public var login : ModelLogin = new ModelLogin();
        public var dosen :ModelDosen= new ModelDosen();
        public var mahasiswa:ModelMahasiswa = new ModelMahasiswa();
        public var pengumuman:ModelPengumuman = new ModelPengumuman();
        public var tugas_akhir:ModelTugasAkhir = new ModelTugasAkhir();
		public var workflowState : Number;
		public var workflowStateDsn : Number;
        public var workflowStateMhs : Number;
        
		public static const VIEWING_LOGIN_SCREEN : Number = 1;
		public static const VIEWING_HOME_DOSEN : Number = 2;
		public static const VIEWING_HOME_MAHASISWA : Number = 3;		
        public static const VIEWING_ROOM:Number=4;
        
        public static const VIEWING_DOSEN_HOME:Number=1;
        public static const VIEWING_BIMBINGAN_DSN:Number=3;
        public static const VIEWING_BIMBINGAN_MHS:Number=3;
	}	
}